import { FC } from "react"

import { SFormItem } from "@/components/common"
import StyleSelect from "@/components/common/styleSelect"
// import { useSelector } from "react-redux"
import { useLocale } from "@/locales"
// import { Select } from "antd"

export type TemplateTypeField = {
	type: number
}
const TemplateType: FC = () => {
	const { newFormat } = useLocale()
	const options = [
		{
			label: newFormat({ id: "label.redLimit.templateBasic" }),
			value: "1"
		},
		{
			label: newFormat({ id: "label.redLimit.templateRouteMerchant" }),
			value: "2"
		},
		{
			label: newFormat({ id: "label.redLimit.templateMerchant" }),
			value: "3"
		}
	]
	// console.log(newFormat({ id: "label.demoList.0" }))
	// const DynamicComponent = lazy(() => dynamicComponent(props.name))
	return (
		<SFormItem name="type" label={newFormat({ id: `label.redLimit.templateType` })}>
			{/* <Select style={{ width: "300px" }} options={options} /> */}
			<StyleSelect w={180} options={options} placeholder={newFormat({ id: "label.select_all" })} />
		</SFormItem>
	)
}

export default TemplateType
